<!-- 页面外套 -->
<div class="page-wrapper" id="personnel_staff">

    <!-- 数据网格 -->
	<div class="datagrid datagrid-striped" id="personnel_staff_datagrid">

        <!-- 工具条组 -->
        <div class="tool-group">
            <div class="tool-search">
                <div class="im-label">
                    <div class="input-group">
                        <select class="form-control" id="personnel_staff_tool_keys">
                            <option value="1">姓名</option>
                            <option value="2">工号</option>
                        </select>
                        <span class="input-group-addon fix-border fix-padding"></span>
                        <input type="text" class="form-control" id="personnel_staff_tool_search">
                    </div>
                </div>
                <div id="personnel_staff_tool_select_group"><!--JS推进--></div>
                <label>
                    <span>状态：</span>
                    <select class="form-control" id="personnel_staff_tool_select4"><!--JS推进--></select>
                </label>
                <label><button class="btn btn-primary" id="personnel_staff_search_btn"><i class="icon icon-search"></i> 搜索</button></label>
                <div class="clearfix"></div>
            </div>
            <div class="tool-deal">
                <label>
                    <div class="btn-group" data-toggle="buttons">
                        <label id="personnel_staff_che1_btn" class="btn btn-primary active"><input type="radio">在职员工</label>
                        <label id="personnel_staff_che2_btn" class="btn btn-primary"><input type="radio">离职员工</label>
                    </div>
                </label>
                <label><button class="btn btn-primary" id="personnel_staff_add_btn"><i class="icon icon-plus"></i> 添加</button></label>
                <div class="clearfix"></div>
            </div>
        </div>
        <!-- tool-group -->

        <div class="datagrid-container"></div>
        <ul class="pager btn-mini" data-elements="prev,pages,next"></ul>
    </div>
    <!-- datagrid -->

    <!-- 添加盒子 -->
    <div class="modal modal-for-page fade" aria-hidden="false" id="personnel_staff_add_box">
        <div class="modal-dialog modal-fullscreen">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">添加</h4>
                </div>
                <div class="modal-body">
                    <form class="container">
                        <!-- 基本信息 -->
                        <blockquote>基本信息 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <ul class="form-checker-board">
                            <li class="col-sm-3"><label><span>姓名      </span><input  id="personnel_staff_add_user" class="form-control" type="text"></label></li>
                            <li class="col-sm-3">
                                <label>
                                    <span>性别</span>
                                    <select id="personnel_staff_add_sexy" class="form-control">
                                        <option value="1">男</option>
                                        <option value="2">女</option>
                                    </select>
                                </label>
                            </li>
                            <li class="col-sm-3"><label><span>手机      </span><input  id="personnel_staff_add_tels" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>民族      </span><input  id="personnel_staff_add_nati" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>出生日期  </span><input  id="personnel_staff_add_birt" class="form-control" type="text" readonly></label></li>
                            <li class="col-sm-3">
                                <label>
                                    <span>婚姻状况</span>
                                    <select id="personnel_staff_add_marr" class="form-control">
                                        <option value="1">未婚</option>
                                        <option value="2">已婚</option>
                                        <option value="3">已育</option>
                                    </select>
                                </label>
                            </li>
                            <li class="col-sm-3"><label><span>紧急联系人</span><input  id="personnel_staff_add_cont_user" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>联系人电话</span><input  id="personnel_staff_add_cont_tels" class="form-control" type="text"></label></li>
                            <li class="col-sm-12">
                                <label>
                                    <span>现居地址</span>
                                    <div>
                                        <div class="input-group">
                                            <select id="personnel_staff_add_addr1" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <select id="personnel_staff_add_addr2" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <select id="personnel_staff_add_addr3" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <input  id="personnel_staff_add_addr4" class="form-control" type="text" > 
                                        </div>
                                    </div>
                                </label>
                            </li>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 入职情况 -->
                        <blockquote>入职情况 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <ul class="form-checker-board">
                            <li class="flex-box col-sm-6" id="personnel_staff_add_select_group"></li>
                            <li class="flex-box col-sm-3"><label><span>入职日期  </span><input  id="personnel_staff_add_pass" class="form-control" type="text" readonly></label></li>
                            <li class="flex-box col-sm-3"><label><span>试用期工资</span><input  id="personnel_staff_add_wag1" class="form-control" type="text"></label></li>
                            <li class="flex-box col-sm-3"><label><span>转正工资  </span><input  id="personnel_staff_add_wag2" class="form-control" type="text"></label></li>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 资料上传 -->
                        <blockquote>资料上传 <span class="small text-red">(证件照/身份证正面/身份证反面 为必填项; 图片大小不超过1M)</span></blockquote>
                        <ul>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader1" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">证件照</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader2" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">身份证正面</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader3" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">身份证反面</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader4" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">毕业证件</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader5" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">荣誉证书</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_add_uploader6" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">离职证明</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 最高学历 -->
                        <blockquote>最高学历 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <table class="table table-condensed table-fixed">
                            <thead>
                                <tr>
                                    <th>学校名称</th>
                                    <th>起止时间</th>
                                    <th>专业</th>
                                    <th>学历/学年制</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_add_edu_school" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_add_edu_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_add_edu_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_add_edu_major" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <select id="personnel_staff_add_edu_level" class="form-control">
                                            <option value="1">初中</option>
                                            <option value="2">高中</option>
                                            <option value="3">中专</option>
                                            <option value="4">大专</option>
                                            <option value="5">本科</option>
                                            <option value="6">研究生</option>
                                            <option value="7">博士生</option>
                                        </select>
                                        <span class="input-group-addon fix-border fix-padding"></span>
                                        <select id="personnel_staff_add_edu_years" class="form-control">
                                            <option value="1">全日制</option>
                                            <option value="2">非全日制</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <!-- 工作经历 -->
                        <blockquote>工作经历</blockquote>
                        <table class="table table-condensed table-fixed">
                            <thead>
                                <tr>
                                    <th>公司名称</th>
                                    <th>起止时间</th>
                                    <th>职位</th>
                                    <th>离职原因</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_add_work1_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_add_work1_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_add_work1_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_add_work1_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_work1_reason" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_add_work2_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_add_work2_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_add_work2_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_add_work2_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_work2_reason" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_add_work3_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_add_work3_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_add_work3_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_add_work3_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_work3_reason" class="form-control" type="text"></td>
                            </tr>
                        </table>
                        <!-- 家庭状况 -->
                        <blockquote>家庭状况</blockquote>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>姓名</th>
                                    <th>关系</th>
                                    <th>工作</th>
                                    <th>手机</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_add_home1_user" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home1_rela" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home1_work" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home1_tels" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_add_home2_user" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home2_rela" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home2_work" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_add_home2_tels" class="form-control" type="text"></td>
                            </tr>
                        </table>
                        <div class="text-center">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary" id="personnel_staff_add_submit">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- personnel_staff_add_box -->

    <!-- 查看盒子 -->
    <div class="modal modal-for-page fade" aria-hidden="false" id="personnel_staff_show_box">
        <div class="modal-dialog modal-fullscreen">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">查看</h4>
                </div>
                <div class="modal-body"><!-- JS推进 --></div>
            </div>
        </div>
    </div>
    <!-- personnel_staff_show_box -->

    <!-- 修改盒子 -->
    <div class="modal modal-for-page fade" aria-hidden="false" id="personnel_staff_edit_box">
        <div class="modal-dialog modal-fullscreen">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">修改</h4>
                </div>
                <div class="modal-body">
                    <form class="container">
                        <!-- 基本信息 -->
                        <blockquote>基本信息 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <ul class="form-checker-board">
                            <li class="col-sm-3"><label><span>姓名      </span><input  id="personnel_staff_edit_user" class="form-control" type="text"></label></li>
                            <li class="col-sm-3">
                                <label>
                                    <span>性别</span>
                                    <select id="personnel_staff_edit_sexy" class="form-control">
                                        <option value="1">男</option>
                                        <option value="2">女</option>
                                    </select>
                                </label>
                            </li>
                            <li class="col-sm-3"><label><span>手机      </span><input  id="personnel_staff_edit_tels" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>民族      </span><input  id="personnel_staff_edit_nati" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>出生日期  </span><input  id="personnel_staff_edit_birt" class="form-control" type="text" readonly></label></li>
                            <li class="col-sm-3">
                                <label>
                                    <span>婚姻状况</span>
                                    <select id="personnel_staff_edit_marr" class="form-control">
                                        <option value="1">未婚</option>
                                        <option value="2">已婚</option>
                                        <option value="3">已育</option>
                                    </select>
                                </label>
                            </li>
                            <li class="col-sm-3"><label><span>紧急联系人</span><input  id="personnel_staff_edit_cont_user" class="form-control" type="text"></label></li>
                            <li class="col-sm-3"><label><span>联系人电话</span><input  id="personnel_staff_edit_cont_tels" class="form-control" type="text"></label></li>
                            <li class="col-sm-12">
                                <label>
                                    <span>现居地址</span>
                                    <div>
                                        <div class="input-group">
                                            <select id="personnel_staff_edit_addr1" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <select id="personnel_staff_edit_addr2" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <select id="personnel_staff_edit_addr3" class="form-control"><!-- JS推进 --></select><span class="input-group-addon fix-border fix-padding"></span>
                                            <input  id="personnel_staff_edit_addr4" class="form-control" type="text"> 
                                        </div>
                                    </div>
                                </label>
                            </li>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 入职情况 -->
                        <blockquote>入职情况 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <ul class="form-checker-board">
                            <li class="flex-box col-sm-6" id="personnel_staff_edit_select_group"></li>
                            <li class="col-sm-3"><label><span>入职日期  </span><input  id="personnel_staff_edit_pass" class="form-control" type="text" readonly></li></label>
                            <li class="col-sm-3"><label><span>试用期工资</span><input  id="personnel_staff_edit_wag1" class="form-control" type="text"></li></label>
                            <li class="col-sm-3"><label><span>转正工资  </span><input  id="personnel_staff_edit_wag2" class="form-control" type="text"></li></label>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 资料上传 -->
                        <blockquote>资料上传 <span class="small text-red">(证件照/身份证正面/身份证反面 为必填项; 图片大小不超过1M)</span></blockquote>
                        <ul>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader1" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">证件照</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader2" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">身份证正面</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader3" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">身份证反面</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader4" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">毕业证件</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader5" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">荣誉证书</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                            <li class="col-sm-2">
                                <!-- 单图上传 -->
                                <div class="card zui_upload_img" id="personnel_staff_edit_uploader6" path="">
                                    <span class="media-wrapper"><img src=""></span>
                                    <div class="uploader-message text-center"><div class="content"></div></div>
                                    <div class="uploader-files file-list hidden"></div>
                                    <span class="card-heading">离职证明</span>
                                    <span class="card-actions">
                                        <a class="btn btn-danger  btn-mini uploader-btn-delete">清空</a>
                                        <a class="btn btn-primary btn-mini uploader-btn-browse">上传</a>
                                    </span> 
                                </div>
                                <!-- zui_upload_img -->
                            </li>
                        </ul>
                        <div class="clearfix"></div><hr>
                        <!-- 最高学历 -->
                        <blockquote>最高学历 <span class="small text-red">(以下均为必填项)</span></blockquote>
                        <table class="table table-condensed table-fixed">
                            <thead>
                                <tr>
                                    <th>学校名称</th>
                                    <th>起止时间</th>
                                    <th>专业</th>
                                    <th>学历/学年制</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_edit_edu_school" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_edit_edu_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_edit_edu_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_edit_edu_major" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <select id="personnel_staff_edit_edu_level" class="form-control">
                                            <option value="1">初中</option>
                                            <option value="2">高中</option>
                                            <option value="3">中专</option>
                                            <option value="4">大专</option>
                                            <option value="5">本科</option>
                                            <option value="6">研究生</option>
                                            <option value="7">博士生</option>
                                        </select>
                                        <span class="input-group-addon fix-border fix-padding"></span>
                                        <select id="personnel_staff_edit_edu_years" class="form-control">
                                            <option value="1">全日制</option>
                                            <option value="2">非全日制</option>
                                        </select>
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <!-- 工作经历 -->
                        <blockquote>工作经历</blockquote>
                        <table class="table table-condensed table-fixed">
                            <thead>
                                <tr>
                                    <th>公司名称</th>
                                    <th>起止时间</th>
                                    <th>职位</th>
                                    <th>离职原因</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_edit_work1_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_edit_work1_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_edit_work1_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_edit_work1_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_work1_reason" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_edit_work2_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_edit_work2_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_edit_work2_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_edit_work2_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_work2_reason" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_edit_work3_comp" class="form-control" type="text"></td>
                                <td>
                                    <div class="input-group">
                                        <input id="personnel_staff_edit_work3_date1" class="form-control" type="text" readonly><span class="input-group-addon fix-border fix-padding"></span>
                                        <input id="personnel_staff_edit_work3_date2" class="form-control" type="text" readonly>
                                    </div>
                                </td>
                                <td><input id="personnel_staff_edit_work3_post" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_work3_reason" class="form-control" type="text"></td>
                            </tr>
                        </table>
                        <!-- 家庭状况 -->
                        <blockquote>家庭状况</blockquote>
                        <table class="table">
                            <thead>
                                <tr>
                                    <th>姓名</th>
                                    <th>关系</th>
                                    <th>工作</th>
                                    <th>手机</th>
                                </tr>
                            </thead>
                            <tr>
                                <td><input id="personnel_staff_edit_home1_user" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home1_rela" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home1_work" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home1_tels" class="form-control" type="text"></td>
                            </tr>
                            <tr>
                                <td><input id="personnel_staff_edit_home2_user" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home2_rela" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home2_work" class="form-control" type="text"></td>
                                <td><input id="personnel_staff_edit_home2_tels" class="form-control" type="text"></td>
                            </tr>
                        </table>
                        <div class="text-center">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                            <button type="button" class="btn btn-primary" id="personnel_staff_edit_submit">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- personnel_staff_edit_box -->

    <!-- 状态盒子 -->
    <div class="modal modal-for-page fade" aria-hidden="false" id="personnel_staff_state_box">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title"><!-- JS推进 --></h4>
                </div>
                <div class="modal-body">
                    <div class="with-padding">确认修改这条数据的状态吗？</div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="personnel_staff_state_submit">保存</button>
                </div>
            </div>
        </div>
    </div>
    <!-- personnel_staff_state_box -->

    <!-- 重置盒子 -->
    <div class="modal modal-for-page fade" aria-hidden="false" id="personnel_staff_reset_box">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
                    <h4 class="modal-title">重置密码</h4>
                </div>
                <div class="modal-body">
                    <div class="with-padding">此次操作将密码重置为：<span class="text-red">000000</span></div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="personnel_staff_reset_submit">提交</button>
                </div>
            </div>
        </div>
    </div>
    <!-- personnel_staff_reset_box -->

</div>
<!-- page-wrapper -->
<script>
$(function(){
    
    //变量声明-----------------------------------------------------------------------------------------------
    var
    personnel_staff                     = $("#personnel_staff"),                    //页面ID
    personnel_staff_datagrid            = $("#personnel_staff_datagrid"),           //数据表格
    
    //搜索
    personnel_staff_tool_keys           = $("#personnel_staff_tool_keys"),          //搜索类别
    personnel_staff_tool_search         = $("#personnel_staff_tool_search"),        //搜索字段
    personnel_staff_tool_select_group   = $("#personnel_staff_tool_select_group"),  //下拉框组
    personnel_staff_tool_select4        = $("#personnel_staff_tool_select4"),       //下拉选择4
    personnel_staff_search_btn          = $("#personnel_staff_search_btn"),         //搜索按钮
    personnel_staff_che1_btn            = $("#personnel_staff_che1_btn"),           //在职员工
    personnel_staff_che2_btn            = $("#personnel_staff_che2_btn"),           //离职员工
    
    //添加
    personnel_staff_add_btn             = $("#personnel_staff_add_btn"),            //添加按钮
    personnel_staff_add_box             = $("#personnel_staff_add_box"),            //添加盒子
    personnel_staff_add_submit          = $("#personnel_staff_add_submit"),         //添加提交

    personnel_staff_add_user            = $("#personnel_staff_add_user"),           //姓名字段
    personnel_staff_add_sexy            = $("#personnel_staff_add_sexy"),           //性别字段
    personnel_staff_add_tels            = $("#personnel_staff_add_tels"),           //手机字段
    personnel_staff_add_nati            = $("#personnel_staff_add_nati"),           //民族字段
    personnel_staff_add_birt            = $("#personnel_staff_add_birt"),           //生日字段
    personnel_staff_add_marr            = $("#personnel_staff_add_marr"),           //婚姻字段
    personnel_staff_add_cont_user       = $("#personnel_staff_add_cont_user"),      //联系人姓名
    personnel_staff_add_cont_tels       = $("#personnel_staff_add_cont_tels"),      //联系人手机
    personnel_staff_add_addr1           = $("#personnel_staff_add_addr1"),          //现居地址1
    personnel_staff_add_addr2           = $("#personnel_staff_add_addr2"),          //现居地址2
    personnel_staff_add_addr3           = $("#personnel_staff_add_addr3"),          //现居地址3
    personnel_staff_add_addr4           = $("#personnel_staff_add_addr4"),          //现居地址4

    personnel_staff_add_depa            = $("#personnel_staff_add_depa"),           //部门
    personnel_staff_add_post            = $("#personnel_staff_add_post"),           //职位
    personnel_staff_add_pass            = $("#personnel_staff_add_pass"),           //入职日期
    personnel_staff_add_wag1            = $("#personnel_staff_add_wag1"),           //试用期工资
    personnel_staff_add_wag2            = $("#personnel_staff_add_wag2"),           //转正工资

    personnel_staff_add_edu_school      = $("#personnel_staff_add_edu_school"),     //学校名称
    personnel_staff_add_edu_date1       = $("#personnel_staff_add_edu_date1"),      //开始时间
    personnel_staff_add_edu_date2       = $("#personnel_staff_add_edu_date2"),      //结束时间
    personnel_staff_add_edu_major       = $("#personnel_staff_add_edu_major"),      //专业
    personnel_staff_add_edu_level       = $("#personnel_staff_add_edu_level"),      //学历
    personnel_staff_add_edu_years       = $("#personnel_staff_add_edu_years"),      //学年制

    personnel_staff_add_work1_comp      = $("#personnel_staff_add_work1_comp"),     //工作公司
    personnel_staff_add_work1_date1     = $("#personnel_staff_add_work1_date1"),    //开始时间
    personnel_staff_add_work1_date2     = $("#personnel_staff_add_work1_date2"),    //结束时间
    personnel_staff_add_work1_post      = $("#personnel_staff_add_work1_post"),     //工作职位
    personnel_staff_add_work1_reason    = $("#personnel_staff_add_work1_reason"),   //离职原因

    personnel_staff_add_work2_comp      = $("#personnel_staff_add_work2_comp"),      //工作公司
    personnel_staff_add_work2_date1     = $("#personnel_staff_add_work2_date1"),    //开始时间
    personnel_staff_add_work2_date2     = $("#personnel_staff_add_work2_date2"),    //结束时间
    personnel_staff_add_work2_post      = $("#personnel_staff_add_work2_post"),     //工作职位
    personnel_staff_add_work2_reason    = $("#personnel_staff_add_work2_reason"),   //离职原因

    personnel_staff_add_work3_comp      = $("#personnel_staff_add_work3_comp"),     //工作公司
    personnel_staff_add_work3_date1     = $("#personnel_staff_add_work3_date1"),    //开始时间
    personnel_staff_add_work3_date2     = $("#personnel_staff_add_work3_date2"),    //结束时间
    personnel_staff_add_work3_post      = $("#personnel_staff_add_work3_post"),     //工作职位
    personnel_staff_add_work3_reason    = $("#personnel_staff_add_work3_reason"),   //离职原因

    personnel_staff_add_home1_user      = $("#personnel_staff_add_home1_user"),     //家人姓名
    personnel_staff_add_home1_rela      = $("#personnel_staff_add_home1_rela"),     //家人关系
    personnel_staff_add_home1_work      = $("#personnel_staff_add_home1_work"),     //家人工作
    personnel_staff_add_home1_tels      = $("#personnel_staff_add_home1_tels"),     //家人电话

    personnel_staff_add_home2_user      = $("#personnel_staff_add_home2_user"),     //家人姓名
    personnel_staff_add_home2_rela      = $("#personnel_staff_add_home2_rela"),     //家人关系
    personnel_staff_add_home2_work      = $("#personnel_staff_add_home2_work"),     //家人工作
    personnel_staff_add_home2_tels      = $("#personnel_staff_add_home2_tels"),     //家人电话

    personnel_staff_add_uploader1       = $("#personnel_staff_add_uploader1"),
    personnel_staff_add_uploader2       = $("#personnel_staff_add_uploader2"),
    personnel_staff_add_uploader3       = $("#personnel_staff_add_uploader3"),
    personnel_staff_add_uploader4       = $("#personnel_staff_add_uploader4"),
    personnel_staff_add_uploader5       = $("#personnel_staff_add_uploader5"),
    personnel_staff_add_uploader6       = $("#personnel_staff_add_uploader6"),

    //修改
    personnel_staff_edit_btn            = $("#personnel_staff_edit_btn"),           //修改按钮
    personnel_staff_edit_box            = $("#personnel_staff_edit_box"),           //修改盒子
    personnel_staff_edit_submit         = $("#personnel_staff_edit_submit"),        //修改提交

    personnel_staff_edit_user           = $("#personnel_staff_edit_user"),          //姓名字段
    personnel_staff_edit_sexy           = $("#personnel_staff_edit_sexy"),          //性别字段
    personnel_staff_edit_tels           = $("#personnel_staff_edit_tels"),          //手机字段
    personnel_staff_edit_nati           = $("#personnel_staff_edit_nati"),          //民族字段
    personnel_staff_edit_birt           = $("#personnel_staff_edit_birt"),          //生日字段
    personnel_staff_edit_marr           = $("#personnel_staff_edit_marr"),          //婚姻字段
    personnel_staff_edit_cont_user      = $("#personnel_staff_edit_cont_user"),     //联系人姓名
    personnel_staff_edit_cont_tels      = $("#personnel_staff_edit_cont_tels"),     //联系人手机
    personnel_staff_edit_addr1          = $("#personnel_staff_edit_addr1"),         //现居地址1
    personnel_staff_edit_addr2          = $("#personnel_staff_edit_addr2"),         //现居地址2
    personnel_staff_edit_addr3          = $("#personnel_staff_edit_addr3"),         //现居地址3
    personnel_staff_edit_addr4          = $("#personnel_staff_edit_addr4"),         //现居地址4

    personnel_staff_edit_depa           = $("#personnel_staff_edit_depa"),          //部门
    personnel_staff_edit_post           = $("#personnel_staff_edit_post"),          //职位
    personnel_staff_edit_pass           = $("#personnel_staff_edit_pass"),          //入职日期
    personnel_staff_edit_wag1           = $("#personnel_staff_edit_wag1"),          //试用期工资
    personnel_staff_edit_wag2           = $("#personnel_staff_edit_wag2"),          //转正工资

    personnel_staff_edit_edu_school     = $("#personnel_staff_edit_edu_school"),    //学校名称
    personnel_staff_edit_edu_date1      = $("#personnel_staff_edit_edu_date1"),     //开始时间
    personnel_staff_edit_edu_date2      = $("#personnel_staff_edit_edu_date2"),     //结束时间
    personnel_staff_edit_edu_major      = $("#personnel_staff_edit_edu_major"),     //专业
    personnel_staff_edit_edu_level      = $("#personnel_staff_edit_edu_level"),     //学历
    personnel_staff_edit_edu_years      = $("#personnel_staff_edit_edu_years"),     //学年制

    personnel_staff_edit_work1_comp     = $("#personnel_staff_edit_work1_comp"),    //工作公司
    personnel_staff_edit_work1_date1    = $("#personnel_staff_edit_work1_date1"),   //开始时间
    personnel_staff_edit_work1_date2    = $("#personnel_staff_edit_work1_date2"),   //结束时间
    personnel_staff_edit_work1_post     = $("#personnel_staff_edit_work1_post"),    //工作职位
    personnel_staff_edit_work1_reason   = $("#personnel_staff_edit_work1_reason"),  //离职原因

    personnel_staff_edit_work2_comp     = $("#personnel_staff_edit_work2_comp"),    //工作公司
    personnel_staff_edit_work2_date1    = $("#personnel_staff_edit_work2_date1"),   //开始时间
    personnel_staff_edit_work2_date2    = $("#personnel_staff_edit_work2_date2"),   //结束时间
    personnel_staff_edit_work2_post     = $("#personnel_staff_edit_work2_post"),    //工作职位
    personnel_staff_edit_work2_reason   = $("#personnel_staff_edit_work2_reason"),  //离职原因

    personnel_staff_edit_work3_comp     = $("#personnel_staff_edit_work3_comp"),    //工作公司
    personnel_staff_edit_work3_date1    = $("#personnel_staff_edit_work3_date1"),   //开始时间
    personnel_staff_edit_work3_date2    = $("#personnel_staff_edit_work3_date2"),   //结束时间
    personnel_staff_edit_work3_post     = $("#personnel_staff_edit_work3_post"),    //工作职位
    personnel_staff_edit_work3_reason   = $("#personnel_staff_edit_work3_reason"),  //离职原因

    personnel_staff_edit_home1_user     = $("#personnel_staff_edit_home1_user"),    //家人姓名
    personnel_staff_edit_home1_rela     = $("#personnel_staff_edit_home1_rela"),    //家人关系
    personnel_staff_edit_home1_work     = $("#personnel_staff_edit_home1_work"),    //家人工作
    personnel_staff_edit_home1_tels     = $("#personnel_staff_edit_home1_tels"),    //家人电话

    personnel_staff_edit_home2_user     = $("#personnel_staff_edit_home2_user"),    //家人姓名
    personnel_staff_edit_home2_rela     = $("#personnel_staff_edit_home2_rela"),    //家人关系
    personnel_staff_edit_home2_work     = $("#personnel_staff_edit_home2_work"),    //家人工作
    personnel_staff_edit_home2_tels     = $("#personnel_staff_edit_home2_tels"),    //家人电话

    personnel_staff_edit_uploader1      = $("#personnel_staff_edit_uploader1"),
    personnel_staff_edit_uploader2      = $("#personnel_staff_edit_uploader2"),
    personnel_staff_edit_uploader3      = $("#personnel_staff_edit_uploader3"),
    personnel_staff_edit_uploader4      = $("#personnel_staff_edit_uploader4"),
    personnel_staff_edit_uploader5      = $("#personnel_staff_edit_uploader5"),
    personnel_staff_edit_uploader6      = $("#personnel_staff_edit_uploader6"),
    //查看
    personnel_staff_show_box            = $("#personnel_staff_show_box"),           //查看盒子
    //状态
    personnel_staff_state_box           = $("#personnel_staff_state_box"),          //状态盒子
    personnel_staff_state_submit        = $("#personnel_staff_state_submit"),       //状态提交
    personnel_staff_state_mess          = $("#personnel_staff_state_mess"),         //状态字段 
    //重置密码
    personnel_staff_reset_box           = $("#personnel_staff_reset_box"),          //重置盒子
    personnel_staff_reset_submit        = $("#personnel_staff_reset_submit");       //重置提交

    //接口对象-----------------------------------------------------------------------------------------------
    if( window.STATE == "local" ){

        //本地接口
        var personnel_staff_api = {
            select          : LOCAL + "Test/test_select.json",                      //下拉选择
            modal_add       : LOCAL + "User/addStaff.json",                         //添加提交
            modal_edit_read : LOCAL + "User/UpdateDetail.json",                     //修改读取
            modal_edit      : LOCAL + "User/updateStaff.json",                      //修改提交
            modal_show      : LOCAL + "User/UpdateDetail.json",                     //查看盒子
            datagrid        : LOCAL + "User/SearchStaff.json",                      //数据表格
        }

    } else if ( window.STATE == "route" ){

        //远程接口
        var personnel_staff_api = {
            select          : LOCAL + "Test/test_select.json",                      //下拉选择
            modal_add       : ROUTE + "User/addStaff",                              //添加提交
            modal_edit_read : ROUTE + "User/UpdateDetail",                          //修改读取
            modal_edit      : ROUTE + "User/updateStaff",                           //修改提交
            modal_show      : ROUTE + "User/staffDetail",                           //查看盒子
            datagrid        : ROUTE + "User/SearchStaff",                           //数据表格
        }

    }

    //数据表格-----------------------------------------------------------------------------------------------
    personnel_staff_datagrid.datagrid({
        height      : zui_datagrid_height(personnel_staff_datagrid),
        sortable    : false,
        cache       : false,
        showRowIndex: true,
        configs     : {
            R0:{className:"text-center"},
            C1:{className:"cell-hidden"}
        },
        states      : {
            fixedLeftUntil  : 3,
            pager           : {
                page        : 1,
                recPerPage  : window.REC_PER_PAGE,
            }
        },
        dataSource : {
            cols   : [
                {name:"id",            label:"ID"  ,  width:49 },
                {name:"name",          label:"姓名",  width:80 },
                {name:"username",      label:"工号",  width:80 },
                {name:"departmentname",label:"部门",  width:80 },
                {name:"positionname",  label:"职位",  width:80 },
                {name:"sex",           label:"性别",  width:50 },
                {name:"isstatename",   label:"状态",  width:80 },
                {name:"operate",label:"操作",  width:180,
                    html:true,
                    valueOperator : {
                        getter : function(dataValue,cell){
                            var temp = "";
                            if ( cell.rowIndex==1 ) {                                   //离职员工
                                temp = `
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_show_btn">查看</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_state_btn" state="1">启用</a>
                                `; 
                            } else if ( cell.rowIndex==2 ) {                            //在职员工
                                temp = `
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_show_btn">查看</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_state_btn" state="1">离职</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_reset_btn">重置密码</a>
                                `; 
                            } else {                                                    //在职员工
                                temp = `
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_show_btn">查看</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_state_btn" state="1">转正</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_state_btn" state="1">离职</a>
                                    <a rowIndex="${cell.rowIndex}" class="personnel_staff_reset_btn">重置密码</a>
                                `; 
                            }
                            return temp;
                        }
                    }
                }
            ],
            remote : function(){
                return {
                    url     : personnel_staff_api.datagrid+"?bs=1",
                    type    : "POST",
                    dataType: "json",
                }
            }
        }
    });

    //变量声明-----------------------------------------------------------------------------------------------
    var
    personnel_staff_datagrid_obj    = personnel_staff_datagrid.data("zui.datagrid"),    //表格对象
    personnel_staff_show_btn        = ".personnel_staff_show_btn",                      //查看
    personnel_staff_reset_btn       = ".personnel_staff_reset_btn",                     //重置密码
    personnel_staff_state_btn       = ".personnel_staff_state_btn";                     //状态按钮
  
    //上传创建-----------------------------------------------------------------------------------------------
    zui_upload_img({upid:"personnel_staff_add_uploader1"});
    zui_upload_img({upid:"personnel_staff_add_uploader2"});
    zui_upload_img({upid:"personnel_staff_add_uploader3"});
    zui_upload_img({upid:"personnel_staff_add_uploader4"});
    zui_upload_img({upid:"personnel_staff_add_uploader5"});
    zui_upload_img({upid:"personnel_staff_add_uploader6"});

    //下拉组件-----------------------------------------------------------------------------------------------
    common_select_linkage("#personnel_staff_tool_select_group","12");                   //搜索
    common_select_linkage("#personnel_staff_add_select_group","12");                    //添加
    common_select_linkage("#personnel_staff_edit_select_group","12");                   //修改    

    //时间组件-----------------------------------------------------------------------------------------------
    personnel_staff_add_birt.datetimepicker(option_date);
    personnel_staff_add_pass.datetimepicker(option_date);
    personnel_staff_add_edu_date1.datetimepicker(option_date);
    personnel_staff_add_edu_date2.datetimepicker(option_date);
    personnel_staff_add_work1_date1.datetimepicker(option_date);
    personnel_staff_add_work1_date2.datetimepicker(option_date);
    personnel_staff_add_work2_date1.datetimepicker(option_date);
    personnel_staff_add_work2_date2.datetimepicker(option_date);
    personnel_staff_add_work3_date1.datetimepicker(option_date);
    personnel_staff_add_work3_date2.datetimepicker(option_date);
    personnel_staff_edit_birt.datetimepicker(option_date);
    personnel_staff_edit_pass.datetimepicker(option_date);
    personnel_staff_edit_edu_date1.datetimepicker(option_date);
    personnel_staff_edit_edu_date2.datetimepicker(option_date);
    personnel_staff_edit_work1_date1.datetimepicker(option_date);
    personnel_staff_edit_work1_date2.datetimepicker(option_date);
    personnel_staff_edit_work2_date1.datetimepicker(option_date);
    personnel_staff_edit_work2_date2.datetimepicker(option_date);
    personnel_staff_edit_work3_date1.datetimepicker(option_date);
    personnel_staff_edit_work3_date2.datetimepicker(option_date);
    
    //下拉选项-----------------------------------------------------------------------------------------------
    //状态
    $.ajax({
        url     : personnel_staff_api.select,
        type    : "post",
        dataType: "json",
        data    : {},
        success : function(data){
            if( data.status>0 ){
                var data = data.data;
                var option = "<option value='0'>全部</option>";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"</option>"
                }
                personnel_staff_tool_select4.html(option);
            }
        }
    });

    //添加修改---------------------------------------------------------------------------------------
    //现居地址(省)
    $.ajax({
        url     : personnel_staff_api.select,
        type    : "post",
        dataType: "json",
        data    : {},
        success : function(data){
            var option = "<option>省</option>";
            for(var i=0;i<data.length;i++){
                option += "<option value='"+data[i].id+"'>"+data[i].name+"</option>"
            }
            personnel_staff_add_addr1.html(option);                     //添加
            personnel_staff_edit_addr1.html(option);                    //修改
        }
    });
    //现居地址(市)
    $.ajax({
        url     : personnel_staff_api.select,
        type    : "post",
        dataType: "json",
        data    : {},
        success : function(data){
            var option = "<option>市</option>";
            for(var i=0;i<data.length;i++){
                option += "<option value='"+data[i].id+"'>"+data[i].name+"</option>"
            }
            personnel_staff_add_addr2.html(option);                     //添加
            personnel_staff_edit_addr2.html(option);                    //修改
        }
    });
    //现居地址(区)
    $.ajax({
        url     : personnel_staff_api.select,
        type    : "post",
        dataType: "json",
        data    : {},
        success : function(data){
            var option = "<option>区</option>";
            for(var i=0;i<data.length;i++){
                option += "<option value='"+data[i].id+"'>"+data[i].name+"</option>"
            }
            personnel_staff_add_addr3.html(option);                     //添加
            personnel_staff_edit_addr3.html(option);                    //修改
        }
    });

    //添加下拉联动-----------------------------------------------------------------------------------------
    //省市区
    personnel_staff_add_addr1.change(function(){

        var addr1 = $(this).val();

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"市]</option>"
                }
                personnel_staff_add_addr2.html(option);
            }
        });

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"区]</option>"
                }
                personnel_staff_add_addr3.html(option);
            }
        });

    });
    //市区
    personnel_staff_add_addr2.change(function(){

        var addr1 = $(this).val();

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"区]</option>"
                }
                personnel_staff_add_addr3.html(option);
            }
        });

    });
    
    //修改下拉联动-----------------------------------------------------------------------------------------
    //省市区
    personnel_staff_edit_addr1.change(function(){

        var addr1 = $(this).val();

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"市]</option>"
                }
                personnel_staff_edit_addr2.html(option);
            }
        });

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"区]</option>"
                }
                personnel_staff_edit_addr3.html(option);
            }
        });

    });
    //市区
    personnel_staff_edit_addr2.change(function(){

        var addr1 = $(this).val();

        $.ajax({
            url     : personnel_staff_api.select,
            type    : "post",
            dataType: "json",
            data    : {},
            success : function(data){
                var option = "";
                for(var i=0;i<data.length;i++){
                    option += "<option value='"+data[i].id+"'>"+data[i].name+"["+addr1+"区]</option>"
                }
                personnel_staff_edit_addr3.html(option);
            }
        });

    });

    //右侧切换-----------------------------------------------------------------------------------------------
    personnel_staff_che1_btn.click(function(){
        personnel_staff_add_btn.show();
        zui_datagrid_render(personnel_staff_datagrid_obj,personnel_staff_api.datagrid+"?search=1");
    });
    personnel_staff_che2_btn.click(function(){
        personnel_staff_add_btn.hide();
        zui_datagrid_render(personnel_staff_datagrid_obj,personnel_staff_api.datagrid+"?search=1");
    });

    //搜索按钮-----------------------------------------------------------------------------------------------
    personnel_staff_search_btn.click(function(){

        //字段整理
        var keyword
        = "?sid="           + personnel_staff_tool_keys.val()
        + "&search="        + personnel_staff_tool_search.val()
        + "&departmentid="  + personnel_staff_tool_select_group.find(".common_select_depart").val()
        + "&positionid="    + personnel_staff_tool_select_group.find(".common_select_post").val()
        + "&isstate="       + personnel_staff_tool_select4.val();

        //GET提交
        zui_datagrid_render(personnel_staff_datagrid_obj,personnel_staff_api.datagrid+keyword);

    });

    //添加按钮-----------------------------------------------------------------------------------------------
    personnel_staff_add_btn.click(function(){
        personnel_staff_add_box.modal("show");
    });
    //添加提交
    personnel_staff_add_submit.click(function(){
        $.ajax({
            url     : personnel_staff_api.modal_add,
            type    : "post",
            dataType: "json",
            data    : {
                //基本信息
                name             : personnel_staff_add_user.val(),
                sex              : personnel_staff_add_sexy.val(),
                tel              : personnel_staff_add_tels.val(),
                mingzu           : personnel_staff_add_nati.val(),
                birthDate        : personnel_staff_add_birt.val(),
                hyzk             : personnel_staff_add_marr.val(),
                p1               : personnel_staff_add_cont_user.val(),
                tel1             : personnel_staff_add_cont_tels.val(),
                addr1            : personnel_staff_add_addr1.val(),
                addr2            : personnel_staff_add_addr2.val(),
                addr3            : personnel_staff_add_addr3.val(),
                addr4            : personnel_staff_add_addr4.val(),
                //入职情况
                departmentId     : personnel_staff_add_depa.val(),
                positionld       : personnel_staff_add_post.val(),
                date             : personnel_staff_add_pass.val(),
                Probationpay     : personnel_staff_add_wag1.val(),
                Revisedwages     : personnel_staff_add_wag2.val(),
                //资料上传
                pic                   : personnel_staff_add_uploader1.attr("path") || "",
                cartZ                 : personnel_staff_add_uploader2.attr("path") || "",
                cartF                 : personnel_staff_add_uploader3.attr("path") || "",
                certificate           : personnel_staff_add_uploader4.attr("path") || "",
                certificateofHonor    : personnel_staff_add_uploader5.attr("path") || "",
                certificateofparation : personnel_staff_add_uploader6.attr("path") || "",
                //最高学历
                schoolName       : personnel_staff_add_edu_school.val(),
                inSchool         : personnel_staff_add_edu_date1.val(),
                outSchool        : personnel_staff_add_edu_date2.val(),
                xueli            : personnel_staff_add_edu_major.val(),
                profession       : personnel_staff_add_edu_level.val(),
                years            : personnel_staff_add_edu_years.val(),
                //工作经历
                company1name     : personnel_staff_add_work1_comp.val(),
                company1time1    : personnel_staff_add_work1_date1.val(),
                company1time2    : personnel_staff_add_work1_date2.val(),
                company1position : personnel_staff_add_work1_post.val(),
                reasons1         : personnel_staff_add_work1_reason.val(),

                company2name     : personnel_staff_add_work2_comp.val(),
                company2time1    : personnel_staff_add_work2_date1.val(),
                company1time2    : personnel_staff_add_work2_date2.val(),
                company2position : personnel_staff_add_work2_post.val(),
                reasons2         : personnel_staff_add_work2_reason.val(),

                company3name     : personnel_staff_add_work3_comp.val(),
                company3time1    : personnel_staff_add_work3_date1.val(),
                company1time2    : personnel_staff_add_work3_date2.val(),
                company3position : personnel_staff_add_work3_post.val(),
                reasons3         : personnel_staff_add_work3_reason.val(),
                //家庭状况
                familyName1      : personnel_staff_add_home1_user.val(),
                relation1        : personnel_staff_add_home1_rela.val(),
                fjob1            : personnel_staff_add_home1_work.val(),
                fTel1            : personnel_staff_add_home1_tels.val(),

                familyName2      : personnel_staff_add_home2_user.val(),
                relation2        : personnel_staff_add_home2_rela.val(),
                fjob2            : personnel_staff_add_home2_work.val(),
                fTel2            : personnel_staff_add_home2_tels.val(),
            },
            success : function(data){
                if( data.status>0 ){
                    um_tip(data.message);
                    zui_datagrid_reset(personnel_staff_datagrid_obj,personnel_staff_api.datagrid);
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });
    });
    //添加关闭
    personnel_staff_add_box.on("hide.zui.modal",function(){
        //上传重置
        zui_upload_reset([
            personnel_staff_add_uploader1,
            personnel_staff_add_uploader2,
            personnel_staff_add_uploader3,
            personnel_staff_add_uploader4,
            personnel_staff_add_uploader5,
            personnel_staff_add_uploader6
        ]);
    });

    //查看按钮-----------------------------------------------------------------------------------------------
    $(document).on("click",personnel_staff_show_btn,function(){ 

        //数据ID
        var data_id  = zui_datagrid_get_id($(this).attr("rowIndex"));

        //远程提交
        $.ajax({
            url     : personnel_staff_api.modal_show,
            type    : "post",
            dataType: "json",
            data    : { id:data_id },
            success : function(data){
                if( data.status>0 ){

                    //查看模板
                    var data = data.data;
                    var pic1_url = ( data.pic1[0] ) ? FILE_PATH + data.pic1[0].url : "";
                    var pic2_url = ( data.pic2[0] ) ? FILE_PATH + data.pic2[0].url : "";
                    var pic3_url = ( data.pic3[0] ) ? FILE_PATH + data.pic3[0].url : "";
                    var pic4_url = ( data.pic4[0] ) ? FILE_PATH + data.pic4[0].url : "";
                    var pic5_url = ( data.pic5[0] ) ? FILE_PATH + data.pic5[0].url : "";
                    var pic6_url = ( data.pic6[0] ) ? FILE_PATH + data.pic6[0].url : "";
                    var temp = `
                        <div class="container">
                            <!-- 角色权限 -->
                            <blockquote>角色权限</blockquote>
                            <table class="table table-bordered">
                                <tr><td>登陆IP：  ${data.ip}  </td></tr>
                                <tr><td>数据角色：${data.role}</td></tr>
                            </table>
                            <!-- 基本信息 -->
                            <blockquote>基本信息</blockquote>
                            <table class="table table-bordered">
                                <tr>
                                    <td>姓名：${data.name}  </td>
                                    <td>性别：${data.sex}   </td>
                                    <td>手机：${data.tel}   </td>
                                    <td>民族：${data.mingzu}</td>
                                </tr>
                                <tr>
                                    <td>出生日期：  ${data.birthDate} </td>
                                    <td>婚姻状况：  ${data.hyzk}      </td>
                                    <td>紧急联系人：${data.p1}        </td>
                                    <td>联系人电话：${data.tel1}      </td>
                                </tr>
                                <tr>
                                    <td colspan="4">现居地址：${data.address}</td>
                                </tr>
                            </table>
                            <!-- 入职情况 -->
                            <blockquote>入职情况</blockquote>
                            <table class="table table-bordered">
                                <tr>
                                    <td>部门：     ${data.departmentId}</td>
                                    <td>职位：     ${data.positionld}</td>
                                    <td>试用期工资：${data.probationpay}</td>
                                    <td>转正工资：  ${data.revisedwages}</td>
                                </tr>
                                <tr>
                                    <td colspan="4">入职日期： ${data.date}</td>
                                </tr>
                            </table>
                            <!-- 资料上传 -->
                            <blockquote>资料上传</blockquote>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic1_url}">
                                    <span class="media-wrapper"><img src="${pic1_url}"></span>
                                    <span class="card-heading">证件照</span>
                                </a>
                            </div>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic2_url}">
                                    <span class="media-wrapper"><img src="${pic2_url}"></span>
                                    <span class="card-heading">身份证正面</span>
                                </a>
                            </div>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic3_url}">
                                    <span class="media-wrapper"><img src="${pic3_url}"></span>
                                    <span class="card-heading">身份证反面</span>
                                </a>
                            </div>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic4_url}">
                                    <span class="media-wrapper"><img src="${pic4_url}"></span>
                                    <span class="card-heading">毕业证件</span>
                                </a>
                            </div>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic5_url}">
                                    <span class="media-wrapper"><img src="${pic5_url}"></span>
                                    <span class="card-heading">荣誉证书</span>
                                </a>
                            </div>
                            <div class="col-sm-2">
                                <a class="card zui_upload_img" target="_blank" href="${pic6_url}">
                                    <span class="media-wrapper"><img src="${pic6_url}"></span>
                                    <span class="card-heading">离职证明</span>
                                </a>
                            </div>
                            <div class="clearfix"></div>
                            <!-- 最高学历 -->
                            <blockquote>最高学历</blockquote>
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>学校名称</th>
                                        <th>起止时间</th>
                                        <th>专业</th>
                                        <th>学历/学年制</th>
                                    </tr>
                                </thead>
                                <tr>
                                    <td>${data.schoolName}                      </td>
                                    <td>${data.inSchool} 至 ${data.outSchool}   </td>
                                    <td>${data.profession}                      </td>
                                    <td>${data.xueli} / ${data.years}           </td>
                                </tr>
                            </table>    
                            <!-- 工作经历 -->
                            <blockquote>工作经历</blockquote>
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>公司名称</th>
                                        <th>起止时间</th>
                                        <th>职位</th>
                                        <th>离职原因</th>
                                    </tr>
                                </thead>
                                <tr>
                                    <td>${data.company1name}    </td>
                                    <td>${data.company1time}    </td>
                                    <td>${data.company1position}</td>
                                    <td>${data.reasons1}        </td>
                                </tr>
                                <tr>
                                    <td>${data.company2name}    </td>
                                    <td>${data.company2time}    </td>
                                    <td>${data.company2position}</td>
                                    <td>${data.reasons2}        </td>
                                </tr>
                                <tr>
                                    <td>${data.company3name}    </td>
                                    <td>${data.company3time}    </td>
                                    <td>${data.company3position}</td>
                                    <td>${data.reasons3}        </td>
                                </tr>
                            </table>
                            <!-- 家庭状况 -->
                            <blockquote>家庭状况</blockquote>
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>姓名</th>
                                        <th>关系</th>
                                        <th>工作</th>
                                        <th>手机</th>
                                    </tr>
                                </thead>
                                <tr>
                                    <td>${data.familyName1} </td>
                                    <td>${data.relation1}   </td>
                                    <td>${data.fjob1}       </td>
                                    <td>${data.fTel1}       </td>
                                </tr>
                                <tr>
                                    <td>${data.familyName2} </td>
                                    <td>${data.relation2}   </td>
                                    <td>${data.fjob2}       </td>
                                    <td>${data.fTel2}       </td>
                                </tr>
                            </table>
                            <div class="text-center">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" id="personnel_staff_edit_btn" rowIndex=${data_id}>修改</button>
                            </div>
                        </div>
                    `;
                    personnel_staff_show_box.find(".modal-body").html(temp);                //模板填充
                    personnel_staff_show_box.modal("show");                                 //盒子显示
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });

    });
    
    //修改按钮-----------------------------------------------------------------------------------------------
    var personnel_staff_edit_btn = "#personnel_staff_edit_btn";                             //修改
    $(document).on("click",personnel_staff_edit_btn,function(){

        //查看盒子关闭
        personnel_staff_show_box.modal("hide");

        //数据ID
        var data_id = zui_datagrid_get_id($(this).attr("rowIndex"));

        //远程提交
        $.ajax({
            url     : personnel_staff_api.modal_edit_read,
            type    : "post",
            dataType: "json",
            data    : { id:data_id },
            success : function(data){
                if( data.status>0 ){

                    //数据赋值
                    var data = data.data;
                    //上传创建
                    window.personnel_staff_edit_uploader1_obj = zui_upload_img({upid:"personnel_staff_edit_uploader1",list:data.pic1});
                    window.personnel_staff_edit_uploader2_obj = zui_upload_img({upid:"personnel_staff_edit_uploader2",list:data.pic2});
                    window.personnel_staff_edit_uploader3_obj = zui_upload_img({upid:"personnel_staff_edit_uploader3",list:data.pic3});
                    window.personnel_staff_edit_uploader4_obj = zui_upload_img({upid:"personnel_staff_edit_uploader4",list:data.pic4});
                    window.personnel_staff_edit_uploader5_obj = zui_upload_img({upid:"personnel_staff_edit_uploader5",list:data.pic5});
                    window.personnel_staff_edit_uploader6_obj = zui_upload_img({upid:"personnel_staff_edit_uploader6",list:data.pic6});
                    //基本信息
                    personnel_staff_edit_user.val(      data.name           );
                    personnel_staff_edit_sexy.val(      data.sex            );
                    personnel_staff_edit_tels.val(      data.tel            );
                    personnel_staff_edit_nati.val(      data.mingzu         );
                    personnel_staff_edit_birt.val(      data.birthDate      );
                    personnel_staff_edit_marr.val(      data.hyzk           );
                    personnel_staff_edit_cont_user.val( data.p1             );
                    personnel_staff_edit_cont_tels.val( data.tel1           );
                    personnel_staff_edit_addr1.val(     data.addr1          );
                    personnel_staff_edit_addr2.val(     data.addr2          );
                    personnel_staff_edit_addr3.val(     data.addr3          );
                    personnel_staff_edit_addr4.val(     data.addr4          );
                    //入职情况
                    personnel_staff_edit_depa.val(      data.departmentId   );
                    personnel_staff_edit_post.val(      data.positionld     );
                    personnel_staff_edit_pass.val(      data.date           );
                    personnel_staff_edit_wag1.val(      data.Probationpay   );
                    personnel_staff_edit_wag2.val(      data.Revisedwages   );
                    //最高学历
                    personnel_staff_edit_edu_school.val(   data.schoolName          );
                    personnel_staff_edit_edu_date1.val(    data.inSchool            );
                    personnel_staff_edit_edu_date2.val(    data.outSchool           );
                    personnel_staff_edit_edu_major.val(    data.xueli               );
                    personnel_staff_edit_edu_level.val(    data.profession          );
                    personnel_staff_edit_edu_years.val(    data.years               );
                    //工作经历
                    personnel_staff_edit_work1_comp.val(   data.company1name        );
                    personnel_staff_edit_work1_date1.val(  data.company1time1       );
                    personnel_staff_edit_work1_date2.val(  data.company1time2       );
                    personnel_staff_edit_work1_post.val(   data.company1position    );
                    personnel_staff_edit_work1_reason.val( data.reasons1            );

                    personnel_staff_edit_work2_comp.val(   data.company2name        );
                    personnel_staff_edit_work2_date1.val(  data.company2time1       );
                    personnel_staff_edit_work2_date2.val(  data.company2time2       );
                    personnel_staff_edit_work2_post.val(   data.company2position    );
                    personnel_staff_edit_work2_reason.val( data.reasons2            );

                    personnel_staff_edit_work3_comp.val(   data.company3name        );
                    personnel_staff_edit_work3_date1.val(  data.company3time1       );
                    personnel_staff_edit_work3_date2.val(  data.company3time2       );
                    personnel_staff_edit_work3_post.val(   data.company3position    );
                    personnel_staff_edit_work3_reason.val( data.reasons3            );
                    //家庭状况
                    personnel_staff_edit_home1_user.val(   data.familyName1         );
                    personnel_staff_edit_home1_rela.val(   data.relation1           );
                    personnel_staff_edit_home1_work.val(   data.fjob1               );
                    personnel_staff_edit_home1_tels.val(   data.fTel1               );

                    personnel_staff_edit_home2_user.val(   data.familyName2         );
                    personnel_staff_edit_home2_rela.val(   data.relation2           );
                    personnel_staff_edit_home2_work.val(   data.fjob2               );
                    personnel_staff_edit_home2_tels.val(   data.fTel2               );

                    //其他操作
                    personnel_staff_edit_submit.attr("dataId",data_id);                     //数据ID传值
                    personnel_staff_edit_box.modal("show");                                 //盒子显示
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });

    });
    //修改提交
    personnel_staff_edit_submit.click(function(){

        //数据ID
        var data_id  = $(this).attr("dataId");

        //远程提交
        $.ajax({
            url     : personnel_staff_api.modal_edit,
            type    : "post",
            dataType: "json",
            data    : { 
                id               : data_id,
                //基本信息
                name             : personnel_staff_edit_user.val(),
                sex              : personnel_staff_edit_sexy.val(),
                tel              : personnel_staff_edit_tels.val(),
                mingzu           : personnel_staff_edit_nati.val(),
                birthDate        : personnel_staff_edit_birt.val(),
                hyzk             : personnel_staff_edit_marr.val(),
                p1               : personnel_staff_edit_cont_user.val(),
                tel1             : personnel_staff_edit_cont_tels.val(),
                addr1            : personnel_staff_edit_addr1.val(),
                addr2            : personnel_staff_edit_addr2.val(),
                addr3            : personnel_staff_edit_addr3.val(),
                addr4            : personnel_staff_edit_addr4.val(),
                //入职情况
                departmentId     : personnel_staff_edit_depa.val(),
                positionld       : personnel_staff_edit_post.val(),
                date             : personnel_staff_edit_pass.val(),
                Probationpay     : personnel_staff_edit_wag1.val(),
                Revisedwages     : personnel_staff_edit_wag2.val(),
                //资料上传
                pic                   : personnel_staff_edit_uploader1.attr("path") || "",
                cartZ                 : personnel_staff_edit_uploader2.attr("path") || "",
                cartF                 : personnel_staff_edit_uploader3.attr("path") || "",
                certificate           : personnel_staff_edit_uploader4.attr("path") || "",
                certificateofHonor    : personnel_staff_edit_uploader5.attr("path") || "",
                certificateofparation : personnel_staff_edit_uploader6.attr("path") || "",
                //最高学历
                schoolName       : personnel_staff_edit_edu_school.val(),
                inSchool         : personnel_staff_edit_edu_date1.val(),
                outSchool        : personnel_staff_edit_edu_date2.val(),
                xueli            : personnel_staff_edit_edu_major.val(),
                profession       : personnel_staff_edit_edu_level.val(),
                years            : personnel_staff_edit_edu_years.val(),
                //工作经历
                company1name     : personnel_staff_edit_work1_comp.val(),
                company1time1    : personnel_staff_edit_work1_date1.val(),
                company1time2    : personnel_staff_edit_work1_date2.val(),
                company1position : personnel_staff_edit_work1_post.val(),
                reasons1         : personnel_staff_edit_work1_reason.val(),

                company2name     : personnel_staff_edit_work2_comp.val(),
                company2time1    : personnel_staff_edit_work2_date1.val(),
                company2time2    : personnel_staff_edit_work2_date2.val(),
                company2position : personnel_staff_edit_work2_post.val(),
                reasons2         : personnel_staff_edit_work2_reason.val(),

                company3name     : personnel_staff_edit_work3_comp.val(),
                company3time1    : personnel_staff_edit_work3_date1.val(),
                company3time2    : personnel_staff_edit_work3_date2.val(),
                company3position : personnel_staff_edit_work3_post.val(),
                reasons3         : personnel_staff_edit_work3_reason.val(),
                //家庭状况
                familyName1      : personnel_staff_edit_home1_user.val(),
                fTel1            : personnel_staff_edit_home1_rela.val(),
                fjob1            : personnel_staff_edit_home1_work.val(),
                relation1        : personnel_staff_edit_home1_tels.val(),

                familyName2      : personnel_staff_edit_home2_user.val(),
                fTel2            : personnel_staff_edit_home2_rela.val(),
                fjob2            : personnel_staff_edit_home2_work.val(),
                relation2        : personnel_staff_edit_home2_tels.val(),
             },
            success : function(data){
                if( data.status>0 ){
                    um_tip(data.message);
                    zui_datagrid_reset(personnel_staff_datagrid_obj,personnel_staff_api.datagrid);
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });

    });
    //修改关闭-销毁
    personnel_staff_edit_box.on("hide.zui.modal",function(){
        //上传销毁
        zui_upload_destroy([
            personnel_staff_edit_uploader1_obj,
            personnel_staff_edit_uploader2_obj,
            personnel_staff_edit_uploader3_obj,
            personnel_staff_edit_uploader4_obj,
            personnel_staff_edit_uploader5_obj,
            personnel_staff_edit_uploader6_obj
        ]);
    });

    //状态按钮-----------------------------------------------------------------------------------------------
    $(document).on("click",personnel_staff_state_btn,function(){ 

        //变量声明
        var data_id = zui_datagrid_get_id($(this).attr("rowIndex"));                       //数据ID
        var text    = $(this).text();                                               //操作名称
        var state   = $(this).attr("state");                                        //操作代号

        //其他操作
        personnel_staff_state_submit.attr("rowIndex",data_id);                      //数据ID赋值
        personnel_staff_state_submit.attr("state",state);                           //操作代号赋值
        personnel_staff_state_box.find(".modal-title").text( text );                //操作名称赋值
        personnel_staff_state_box.modal("show");                                    //盒子显示

    });
    //状态提交
    personnel_staff_state_submit.click(function(){

        //数据ID
        var data_id = $(this).attr("rowIndex");                                     //数据ID
        var state   = $(this).attr("state");                                        //操作代号
        
        //远程提交
        $.ajax({
            url     : API.test_response,
            type    : "post",
            dataType: "json",
            data    : { 
                id      : data_id,
                isstate : state
            },
            success : function(data){
                if( data.status>0 ){
                    um_tip(data.message);
                    zui_datagrid_reset(personnel_staff_datagrid_obj,personnel_staff_api.datagrid);
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });

    });

    //重置密码-----------------------------------------------------------------------------------------------
    $(document).on("click",personnel_staff_reset_btn,function(){

        //数据ID
        var data_id  = zui_datagrid_get_id($(this).attr("rowIndex"));

        //其他操作
        personnel_staff_reset_submit.attr("dataId",data_id);                //数据ID传值
        personnel_staff_reset_box.modal("show");                            //盒子显示
    });
    //重置提交
    personnel_staff_reset_submit.click(function(){

        //数据ID
        var data_id  = $(this).attr("dataId");

        //远程提交
        $.ajax({
            url     : API.test_response,
            type    : "post",
            dataType: "json",
            data    : { id:data_id },
            success : function(data){
                if( data.status>0 ){
                    um_tip(data.message);
                    zui_datagrid_reset(personnel_staff_datagrid_obj,personnel_staff_api.datagrid);
                } else {
                    um_tip(data.message,"1500","text-danger");
                }
            }
        });

    });

    //添加测试-----------------------------------------------------------------------------------------------
    setTimeout(function(){
        personnel_staff_add_user.val("刘德华");
        personnel_staff_add_sexy.val(1);
        personnel_staff_add_tels.val("18332367556");
        personnel_staff_add_nati.val("汉族");
        personnel_staff_add_birt.val("1963-06-10");
        personnel_staff_add_marr.val(1);
        personnel_staff_add_cont_user.val("张学友");
        personnel_staff_add_cont_tels.val("17715814754");
        personnel_staff_add_addr1 .val(1);
        personnel_staff_add_addr2.val(1);
        personnel_staff_add_addr3.val(1);
        personnel_staff_add_addr4.val("211中山路197号");

        personnel_staff_add_depa.val(1);
        personnel_staff_add_post.val(1);
        personnel_staff_add_pass.val("2019-06-10");
        personnel_staff_add_wag1.val("7000");
        personnel_staff_add_wag2.val("8000");

        personnel_staff_add_edu_school.val("香港政法大学");
        personnel_staff_add_edu_date1.val("2019-06-10");
        personnel_staff_add_edu_date2.val("2019-06-10");
        personnel_staff_add_edu_major.val("法律系");
        personnel_staff_add_edu_level.val(1);
        personnel_staff_add_edu_years.val(1);

        personnel_staff_add_work1_comp.val("TVB1");
        personnel_staff_add_work1_date1.val("2019-06-10");
        personnel_staff_add_work1_date2.val("2019-06-10");
        personnel_staff_add_work1_post.val("无线五虎1");
        personnel_staff_add_work1_reason.val("档期重叠1");

        personnel_staff_add_work2_comp.val("TVB2");
        personnel_staff_add_work2_date1.val("2019-06-10");
        personnel_staff_add_work2_date2.val("2019-06-10");
        personnel_staff_add_work2_post.val("无线五虎2");
        personnel_staff_add_work2_reason.val("档期重叠2");

        personnel_staff_add_work3_comp.val("TVB3");
        personnel_staff_add_work3_date1.val("2019-06-10");
        personnel_staff_add_work3_date2.val("2019-06-10");
        personnel_staff_add_work3_post.val("无线五虎3");
        personnel_staff_add_work3_reason.val("档期重叠3");

        personnel_staff_add_home1_user.val("郭富城");
        personnel_staff_add_home1_rela.val("朋友");
        personnel_staff_add_home1_work.val("演员");
        personnel_staff_add_home1_tels.val("17715814754");

        personnel_staff_add_home2_user.val("张学友");
        personnel_staff_add_home2_rela.val("朋友");
        personnel_staff_add_home2_work.val("演员");
        personnel_staff_add_home2_tels.val("17715814754");
    },1000);

});//预加载结尾
</script>